<template>
  <div class="page-home">
    <!-- 焦点部分 -->
    <div class="home-entry">
      <div class="container">
        <!-- 左侧分类 -->
        <HomeCategory />
        <!-- banner轮播图 -->
        <HomeBanner />
      </div>
    </div>
    <!-- 楼层 - 新鲜好物 -->
    <HomeNew />
    <Suspense>
      <template #default>
        <!-- 楼层 - 人气推荐 -->
        <HomeHot />
      </template>
      <template #fallback>
        <h1>Loading...</h1>
      </template>
    </Suspense>
  </div>
</template>

<script>
import HomeCategory from './components/home-category'
import HomeBanner from './components/home-banner.vue'
import HomeNew from './components/home-new'
// import HomeHot from './components/home-hot.vue'
import { defineAsyncComponent } from 'vue'
export default {
  name: 'PageHome',
  components: {
    HomeBanner,
    HomeCategory,
    HomeNew,
    // HomeHot,
    HomeHot: defineAsyncComponent(() => import('./components/home-hot.vue'))
    // HomeNew: defineAsyncComponent(() => import('./components/home-new.vue'))
  }
}
</script>
